package fhp.hlhj.giantfold.presenter

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.ISellers
import fhp.hlhj.giantfold.javaBean.MerchantBean
import fhp.hlhj.giantfold.javaBean.SellersBean
import fhp.hlhj.giantfold.module.SellersModule

/**
 * author: FHP
 * data: on 2018\1\31 0031 15:12
 * E-Mail: 103945089@qq.com
 */
class SellersPresenter(private val iSellers: ISellers) : SellersModule.onLoadSellerListener {
    private val sellerModule=SellersModule()

    fun getSeller(){
        sellerModule.getSellers(this)
    }


    override fun showLoading() {
        iSellers.showLoading()
    }

    override fun getSellers(sellersBean: SellersBean) {
        iSellers.getSellers(sellersBean)
    }

    fun getMerchant(params: HttpParams){
        sellerModule.getMerchantDetail(params,this)
    }

    override fun getMerchants(merchantBean: MerchantBean) {
        iSellers.getMerchant(merchantBean)
    }
}
